package com.msite.service.rabbitmq;

import org.springframework.stereotype.Component;

/**
 * Created by tpeng on 2015/12/31.
 */
@Component
public class RabbitmqService {

   /* @Resource
    private RabbitTemplate rabbitTemplate;

    public void sendMessage(){
        MQMessage m = new MQMessage();
        m.setId(1L);
        m.setContent("我是mqmessage");
//        exchangeTemplate.setExchange(RabbitMQConfig.MQKEY + "message_exchange");
//        exchangeTemplate.setRoutingKey(RabbitMQConfig.MQKEY + "routing.key.message");
        rabbitTemplate.convertAndSend(RabbitMQConfig.QUEUE_MESSAGE, m);
    }

    public void sendContentMessage(){
        MQContent c = new MQContent();
        c.setCid(2L);
        c.setMsg("我是mqcontent");
//        exchangeTemplate.setExchange(RabbitMQConfig.MQKEY + "content_exchange");
//        exchangeTemplate.setRoutingKey(RabbitMQConfig.MQKEY + "routing.key.content");
        rabbitTemplate.convertAndSend(RabbitMQConfig.QUEUE_CONTENT, c);
    }*/

}
